package com.stream;

import java.util.Objects;

/**
 * @Author:zxh
 * @Description: 供测试
 * @Date: 2020/9/24
 * @Modified By:
 */
public class Student {
    private String name;
    private String nameTwo;
    private int age;
    private int ageTwo;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getNameTwo() {
        return nameTwo;
    }

    public void setNameTwo(String nameTwo) {
        this.nameTwo = nameTwo;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public int getAgeTwo() {
        return ageTwo;
    }

    public void setAgeTwo(int ageTwo) {
        this.ageTwo = ageTwo;
    }

    public Student() {
    }

    public Student(String name) {
        this.name = name;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Student student = (Student) o;
        return age == student.age &&
                ageTwo == student.ageTwo &&
                Objects.equals(name, student.name) &&
                Objects.equals(nameTwo, student.nameTwo);
    }

    @Override
    public int hashCode() {
        return Objects.hash(name, nameTwo, age, ageTwo);
    }

    public Student(String name, String nameTwo, Integer age, int ageTwo) {

        this.name = name;
        this.nameTwo = nameTwo;
        this.age = age;
        this.ageTwo = ageTwo;
    }
}
